{template header}
	<div id="nav"><a href="$indexname">$bbname</a> &raquo;
		<!--{if $operation == 'uselog'}-->
			{lang magics_log_use}
		<!--{elseif $operation == 'buylog'}-->
			{lang magics_log_buy}
		<!--{elseif $operation == 'givelog'}-->
			{lang magics_log_present}
		<!--{elseif $operation == 'receivelog'}-->
			{lang magics_log_receive}
		<!--{elseif $operation == 'marketlog'}-->
			{lang magics_log_market}
		<!--{/if}-->
	</div>
	<div class="container">
		<div class="side">
			{template magic_navbar}
		</div>
		<div class="content">
			<!--{if !$magicstatus && $adminid == 1}-->
				<div class="notice">{lang magics_tips}</div>
			<!--{/if}-->
			<!--{if $operation == 'uselog'}-->
				<div class="mainbox">
					<h1>{lang magics_log_use}</h1>
					<table summary="{lang magics_log_use}" cellspacing="0" cellpadding="0">
						<thead>
							<tr>
								<td>{lang magics_name}</td>
								<td class="time">{lang magics_dateline_use}</td>
								<td>{lang magics_target_use}</td>
							</tr>
						</thead>
						<!--{if $loglist}-->
							<!--{loop $loglist $log}-->
								<tr>
									<td><a href="magic.php?action=shop&operation=buy&magicid=$log[magicid]" target="_blank">$log[name]</a></td>
									<td class="time">$log[dateline]</td>
									<td><!--{if $log['target']}--><a href="$log[target]" target="_blank">{lang magics_target}</a><!--{else}-->{lang magics_operation_drop}<!--{/if}--></td>
								</tr>
							<!--{/loop}-->
						<!--{else}-->
							<tr><td colspan="3">{lang magics_log_nonexistence}</td></tr>
						<!--{/if}-->
					</table>
				</div>
				<!--{if !empty($multipage)}--><div class="pages_btns">$multipage</div><!--{/if}-->
			<!--{elseif $operation == 'buylog'}-->
				<div class="mainbox">
					<h1>{lang magics_log_buy}</h1>
					<table summary="{lang magics_log_buy}" cellspacing="0" cellpadding="0">
						<thead>
							<tr>
								<td>{lang magics_name}</td>
								<td class="time">{lang magics_dateline_buy}</td>
								<td class="nums">{lang magics_amount_buy}</td>
								<td>{lang magics_price_buy}</td>
							</tr>
						</thead>
						<!--{if $loglist}-->
							<!--{loop $loglist $log}-->
								<tr>
									<td><a href="magic.php?action=shop&operation=buy&magicid=$log[magicid]" target="_blank">$log[name]</a></td>
									<td class="time">$log[dateline]</td>
									<td class="nums">$log[amount]</td>
									<td>$log[price] $extcredits[$creditstrans][title]</td>
								</tr>
							<!--{/loop}-->
						<!--{else}-->
							<tr><td colspan="4">{lang magics_log_nonexistence}</td></tr>
						<!--{/if}-->
					</table>
				</div>
				<!--{if !empty($multipage)}--><div class="pages_btns">$multipage</div><!--{/if}-->
			<!--{elseif $operation == 'givelog'}-->
				<div class="mainbox">
					<h1>{lang magics_log_present}</h1>
					<table summary="{lang magics_log_present}" cellspacing="0" cellpadding="0">
						<thead>
							<tr>
								<td>{lang magics_name}</td>
								<td class="time">{lang magics_dateline_present}</td>
								<td class="nums">{lang magics_amount_present}</td>
								<td class="user">{lang magics_target_present}</td>
							</tr>
						</thead>
						<!--{if $loglist}-->
							<!--{loop $loglist $log}-->
								<tr>
									<td><a href="magic.php?action=shop&operation=buy&magicid=$log[magicid]" target="_blank">$log[name]</a></td>
									<td class="time">$log[dateline]</td>
									<td class="nums">$log[amount]</td>
									<td class="auser"><a href="space.php?action=viewpro&uid=$log[targetuid]" target="_blank">$log[username]</a></td>
								</tr>
							<!--{/loop}-->
						<!--{else}-->
							<tr><td colspan="5">{lang magics_log_nonexistence}</td></tr>
						<!--{/if}-->
					</table>
				</div>
				<!--{if !empty($multipage)}--><div class="pages_btns">$multipage</div><!--{/if}-->
			<!--{elseif $operation == 'receivelog'}-->
				<div class="mainbox">
					<h1>{lang magics_log_receive}</h1>
					<table summary="{lang magics_log_receive}" cellspacing="0" cellpadding="0">
					<thead>
						<tr>
							<td>{lang magics_name}</td>
							<td class="time">{lang magics_dateline_receive}</td>
							<td class="nums">{lang magics_amount_receive}</td>
							<td class="auser">{lang magics_target_receive}</td>
						</tr>
					</thead>
					<!--{if $loglist}-->
						<!--{loop $loglist $log}-->
							<tr>
								<td><a href="magic.php?action=shop&operation=buy&magicid=$log[magicid]" target="_blank">$log[name]</a></td>
								<td class="time">$log[dateline]</td>
								<td class="nums">$log[amount]</td>
								<td class="user"><a href="space.php?action=viewpro&uid=$log[targetuid]" target="_blank">$log[username]</a></td>
							</tr>
						<!--{/loop}-->
					<!--{else}-->
						<tr><td colspan="4">{lang magics_log_nonexistence}</td></tr>
					<!--{/if}-->
					</table>
				</div>
				<!--{if !empty($multipage)}--><div class="pages_btns">$multipage</div><!--{/if}-->
			<!--{elseif $operation == 'marketlog'}-->
				<div class="mainbox">
					<h1>{lang magics_log_market}</h1>
					<table summary="{lang magics_log_market}" cellspacing="0" cellpadding="0">
						<thead>
							<tr>
								<td>{lang magics_name}</td>
								<td class="time">{lang magics_dateline_operation}</td>
								<td class="nums">{lang magics_amount_operation}</td>
								<td>{lang magics_price_operation}</td>
								<td>{lang magics_operation}</td>
							</tr>
						</thead>
						<!--{if $loglist}-->
							<!--{loop $loglist $log}-->
								<tr>
									<td><a href="magic.php?action=shop&operation=buy&magicid=$log[magicid]" target="_blank">$log[name]</a></td>
									<td class="time">$log[dateline]</td>
									<td class="nums">$log[amount]</td>
									<td>$log[price] $extcredits[$creditstrans][title]</td>
									<td><!--{if $log['action'] == '4'}-->{lang magics_operation_sell}<!--{elseif $log['action'] == '5'}-->{lang magics_operation_buy}<!--{elseif $log['action'] == '6'}-->{lang magics_operation_down}<!--{/if}--></td>
								</tr>
							<!--{/loop}-->
						<!--{else}-->
							<tr><td colspan="4">{lang magics_log_nonexistence}</td></tr>
						<!--{/if}-->
					</table>
				</div>
				<!--{if !empty($multipage)}--><div class="pages_btns">$multipage</div><!--{/if}-->
			<!--{/if}-->
		</div>
	</div>
{template footer}